# Message Hub

# Message Hub Overview

The Message Hub is a core feature of the PMG Platform which provides for server-side generated events to send messages clients, typically PMG Apps or other core features of the user interface of the PMG application. A list of common Message Hub activities are as follows.

  • Live updates to workflow execution diagrams

  • Toast alerts throughout the web application

  • Live updates to Work Dashboard

  • Activity and data updates to custom App widgets

Messages sent from the application server are assigned a "Reference" or an identifier which acts as the key for the sender and the receiver of the messages to communicate. For example, a workflow action may send a message to the hub with an ID of its own workflow ID. A widget running within an app can also register with the same ID and will receive messages sent from the server. Please see the "Event Monitor Widget" for information about using Workflow Events from within an App. Please see "Send Message To Hub" workflow action for information about sending messages to the Hub from workflows.

# Message Hub Configuration

The Message Hub is managed from Administration, "Message Hub". The Message Hub screen displays information about the current state and configuration of the Message Hub as well as utilities to validate Message Hub configuration.

To enable Message Hub, validate the proper "external_urls" are defined in the presented configuration JSON. A convenience utility is provided to add the active URL to the configuration. Select "Add Current URL" to add the current URL from the browser session to the configuration. Once the configuration is defined, select "Save", and "Enabled"

The Message Hub typically requires some time, say 30-60 seconds to configure itself and validate end-to-end communications with the server to the client browser. The status is shown in the "Status" indicator section. Once the Message Hub indicates "Connected", you can use the "Test Send" with a simple message to confirm the configuration is operating properly. The message you provide will be displayed back in a toast message if successful.

Additionally, you can validate additional "channels" by registering a "Test Receiver" with some Reference ID and using "Test Raw" to send a message to the same Reference ID.